" Vim syntax file
" Language:	Qt C++
" Author: heefan
" License: GPL
" Qt Version: 4.7.3
"
" useful define:
" E.G
"hi def QtFunction term=italic,bold cterm=italic ctermbg=yellow ctermfg=darkblue gui=bold,italic guibg=yellow guifg=darkblue

syn match   customFunc "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2
syn match   customFunc "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1
hi customFunc gui=italic guifg=#E54023   " C math operators
syn match    cCustomScope    "::"
syn match    cCustomClass    "\w\+\s*::" contains=cCustomScope
hi cCustomClass gui=italic,bold guifg=#E54023   " C math operators

syn match       cMathOperator     display "[-+\*/%=]"
syn match       cPointerOperator  display "->\|\."
syn match       cLogicalOperator  display "[!<>]=\="
syn match       cLogicalOperator  display "=="
syn match       cBinaryOperator   display "\(&\||\|\^\|<<\|>>\)=\="
syn match       cBinaryOperator   display "\~"
syn match       cBinaryOperatorError display "\~="
syn match       cLogicalOperator  display "&&\|||"
syn match       cLogicalOperatorError display "\(&&\|||\)="
"
" Math Operator
hi cMathOperator            guifg=#A82DC9
hi cPointerOperator         guifg=#A82DC9
hi cLogicalOperator         guifg=#A82DC9
hi cBinaryOperator          guifg=#A82DC9
hi cBinaryOperatorError     guifg=#A82DC9
hi cLogicalOperator         guifg=#A82DC9
hi cLogicalOperatorError    guifg=#A82DC9


"---------------- Qt 4.7.3 ----------------------------------------
" Macro
hi def QtMacro term=italic cterm=italic gui=italic guifg=Magenta
syn keyword QtMacro Q_OBJECT QT_BEGIN_NAMESPACE QT_END_NAMESPACE

" Class
hi def QtFunction term=italic cterm=italic gui=italic guifg=#1B81BD

syn keyword QtFunction  QAccel QDict QIconFactory QPicture QSyntaxHighlighter
syn keyword QtFunction  QAccessible QDictIterator QIconSet QPixmap Qt
syn keyword QtFunction  QAccessibleInterface QDir QIconView QPixmapCache QTab
syn keyword QtFunction  QAccessibleObject QDirectPainter QIconViewItem QPlatinumStyle QTabBar
syn keyword QtFunction  QAction QDns QImage QPNGImagePacker QTabDialog
syn keyword QtFunction  QActionGroup QDockArea QImageConsumer QPoint QTable
syn keyword QtFunction  QApplication QDockWindow QImageDecoder QPointArray QTableItem
syn keyword QtFunction  QAquaStyle QDomAttr QImageDrag QPopupMenu QTableSelection
syn keyword QtFunction  QAsciiCache QDomCDATASection QImageFormat QPrinter QTabletEvent
syn keyword QtFunction  QAsciiCacheIterator QDomCharacterData QImageFormatPlugin QProcess QTabWidget
syn keyword QtFunction  QAsciiDict QDomComment QImageFormatType QProgressBar QTextBrowser
syn keyword QtFunction  QAsciiDictIterator QDomDocument QImageIO QProgressDialog QTextCodec
syn keyword QtFunction  QAssistantClient QDomDocumentFragment QIMEvent QPtrCollection QTextCodecPlugin
syn keyword QtFunction  QAxAggregated  QDomDocumentType QInputDialog QPtrDict QTextDecoder
syn keyword QtFunction  QAxBase  QDomElement QIntCache QPtrDictIterator QTextDrag
syn keyword QtFunction  QAxBindable  QDomEntity QIntCacheIterator QPtrList QTextEdit
syn keyword QtFunction  QAxFactory  QDomEntityReference QIntDict QPtrListIterator QTextEncoder
syn keyword QtFunction  QAxObject  QDomImplementation QIntDictIterator QPtrQueue QTextIStream
syn keyword QtFunction  QAxWidget  QDomNamedNodeMap QIntValidator QPtrStack QTextOStream
syn keyword QtFunction  QBig5Codec QDomNode QIODevice QPtrVector QTextStream
syn keyword QtFunction  QBig5hkscsCodec QDomNodeList QJisCodec QPushButton QThread
syn keyword QtFunction  QBitArray QDomNotation QKbdDriverFactory QRadioButton QTime
syn keyword QtFunction  QBitmap QDomProcessingInstruction QKbdDriverPlugin QRangeControl QTimeEdit
syn keyword QtFunction  QBitVal QDomText QKeyEvent QRect QTimer
syn keyword QtFunction  QBoxLayout QDoubleValidator QKeySequence QRegExp QTimerEvent
syn keyword QtFunction  QBrush QDragEnterEvent QLabel QRegExpValidator QToolBar
syn keyword QtFunction  QBuffer QDragLeaveEvent QLayout QRegion QToolButton
syn keyword QtFunction  QButton QDragMoveEvent QLayoutItem QResizeEvent QToolTip
syn keyword QtFunction  QButtonGroup QDragObject QLayoutIterator QScreen QToolTipGroup
syn keyword QtFunction  QByteArray QDropEvent QLCDNumber QScrollBar QTranslator
syn keyword QtFunction  QCache QEditorFactory QLibrary QScrollView QTranslatorMessage
syn keyword QtFunction  QCacheIterator QErrorMessage QLineEdit QSemaphore QTsciiCodec
syn keyword QtFunction  QCanvas QEucJpCodec QListBox QServerSocket QUriDrag
syn keyword QtFunction  QCanvasEllipse QEucKrCodec QListBoxItem QSessionManager QUrl
syn keyword QtFunction  QCanvasItem QEvent QListBoxPixmap QSettings QUrlInfo
syn keyword QtFunction  QCanvasItemList QEventLoop QListBoxText QSGIStyle QUrlOperator
syn keyword QtFunction  QCanvasLine QFile QListView QShowEvent QValidator
syn keyword QtFunction  QCanvasPixmap QFileDialog QListViewItem QSignal QValueList
syn keyword QtFunction  QCanvasPixmapArray QFileIconProvider QListViewItemIterator QSignalMapper 
syn keyword QtFunction  QCanvasPolygon QFileInfo QLocalFs QSimpleRichText QValueListIterator
syn keyword QtFunction  QCanvasPolygonalItem QFilePreview QMacStyle QSize QValueStack
syn keyword QtFunction  QCanvasRectangle QFocusData QMainWindow QSizeGrip QValueVector
syn keyword QtFunction  QCanvasSpline QFocusEvent QMap QSizePolicy QVariant
syn keyword QtFunction  QCanvasSprite QFont QMapConstIterator QSjisCodec QVBox
syn keyword QtFunction  QCanvasText QFontDatabase QMapIterator QSlider QVBoxLayout
syn keyword QtFunction  QCanvasView QFontDialog QMemArray QSocket QVButtonGroup
syn keyword QtFunction  QCDEStyle QFontInfo QMenuBar QSocketDevice QVGroupBox
syn keyword QtFunction  QChar QFontManager QMenuData QSocketNotifier QWaitCondition
syn keyword QtFunction  QCharRef QFontMetrics QMessageBox QSound QWhatsThis
syn keyword QtFunction  QCheckBox QFrame QMetaObject QSpacerItem QWheelEvent
syn keyword QtFunction  QCheckListItem QFtp QMetaProperty QSpinBox QWidget
syn keyword QtFunction  QCheckTableItem QGb18030Codec QMimeSource QSplitter QWidgetFactory
syn keyword QtFunction  QChildEvent QGb2312Codec QMimeSourceFactory QSql QWidgetItem
syn keyword QtFunction  QClipboard QGbkCodec QMotif  QSqlCursor QWidgetPlugin
syn keyword QtFunction  QCloseEvent QGfxDriverFactory QMotifDialog  QSqlDatabase QWidgetStack
syn keyword QtFunction  QColor QGfxDriverPlugin QMotifPlusStyle QSqlDriver QWindowsMime
syn keyword QtFunction  QColorDialog QGL QMotifStyle QSqlDriverPlugin QWindowsStyle
syn keyword QtFunction  QColorDrag QGLayoutIterator QMotifWidget  QSqlEditorFactory QWizard
syn keyword QtFunction  QColorGroup QGLColormap QMouseDriverFactory QSqlError QWMatrix
syn keyword QtFunction  QComboBox QGLContext QMouseDriverPlugin QSqlField QWorkspace
syn keyword QtFunction  QComboTableItem QGLFormat QMouseEvent QSqlFieldInfo QWSDecoration
syn keyword QtFunction  QCommonStyle QGLWidget QMoveEvent QSqlForm QWSInputMethod
syn keyword QtFunction  QConstString QGrid QMovie QSqlIndex QWSKeyboardHandler
syn keyword QtFunction  QContextMenuEvent QGridLayout QMutex QSqlPropertyMap QWSMouseHandler
syn keyword QtFunction  QCopChannel QGridView QMutexLocker QSqlQuery QWSServer
syn keyword QtFunction  QCString QGroupBox QNetworkOperation QSqlRecord QWSWindow
syn keyword QtFunction  QCursor QGuardedPtr QNetworkProtocol QSqlRecordInfo QXmlAttributes
syn keyword QtFunction  QCustomEvent QHBox QNPInstance  QSqlResult QXmlContentHandler
syn keyword QtFunction  QCustomMenuItem QHBoxLayout QNPlugin  QStatusBar QXmlDeclHandler
syn keyword QtFunction  QDataBrowser QHButtonGroup QNPStream  QStoredDrag QXmlDefaultHandler
syn keyword QtFunction  QDataStream QHeader QNPWidget  QStrIList QXmlDTDHandler
syn keyword QtFunction  QDataTable QHebrewCodec QObject QString QXmlEntityResolver
syn keyword QtFunction  QDataView QHGroupBox QObjectCleanupHandler QStringList QXmlErrorHandler
syn keyword QtFunction  QDate QHideEvent QObjectList QStrList QXmlInputSource
syn keyword QtFunction  QDateEdit QHostAddress QPaintDevice QStrListIterator QXmlLexicalHandler
syn keyword QtFunction  QDateTime QHttp QPaintDeviceMetrics QStyle QXmlLocator
syn keyword QtFunction  QDateTimeEdit QHttpHeader QPainter QStyleFactory QXmlNamespaceSupport
syn keyword QtFunction  QDeepCopy QHttpRequestHeader QPaintEvent QStyleOption QXmlParseException
syn keyword QtFunction  QDesktopWidget QHttpResponseHeader QPair QStylePlugin QXmlReader
syn keyword QtFunction  QDial QIconDrag QPalette QStyleSheet QXmlSimpleReader
syn keyword QtFunction  QDialog QIconDragItem QPen QStyleSheetItem QXtWidget 
syn keyword QtFunction  QSslSocket QList QUdpSocket quint16 QValueListConstIterator
syn keyword QtFunction  Ui_Form QVector
syn keyword QtFunction  string vector NULL
